import request from "@/axios";

export function getStationInfo(){
    return request({
        url: '/sc/station/info',
        method: 'get'
    })
}

export function updateOrSaveStation(data){
    return request({
        url: data.accountId ? '/sc/station/update' : '/pc/userinfo/save',
        method: 'post',
        data
    })
}

export function getStationOrderList(orderId, posName){
    return request({
        url: '/sc/order/list',
        method: 'get',
        params: {
            orderId,
            posName
        }
    })
}

export function updateOrSaveStationOrder(data){
    return request({
        url: data.orderId ? '/sc/order/update' : '/sc/order/save',
        method: 'post',
        data
    })
}

export function getStationOrderInfo(orderId){
    return request({
        url: '/sc/order/info/' + orderId,
        method: 'get'
    })
}
